<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Entitas: Entitas.Group&lt; TEntity &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="docs-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Entitas
   &#160;<span id="projectnumber">1.13.0</span>
   </div>
   <div id="projectbrief">Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_entitas_1_1_group.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="#events">Events</a> &#124;
<a href="class_entitas_1_1_group-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Entitas.Group&lt; TEntity &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for Entitas.Group&lt; TEntity &gt;:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_entitas_1_1_group.png" usemap="#Entitas.Group_3C_20TEntity_20_3E_map" alt=""/>
  <map id="Entitas.Group_3C_20TEntity_20_3E_map" name="Entitas.Group_3C_20TEntity_20_3E_map">
<area href="interface_entitas_1_1_i_group.html" alt="Entitas.IGroup&lt; TEntity &gt;" shape="rect" coords="0,0,153,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acaac9039a6a059d944ccacd976980883"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#acaac9039a6a059d944ccacd976980883">Group</a> (<a class="el" href="interface_entitas_1_1_i_matcher.html">IMatcher</a>&lt; TEntity &gt; <a class="el" href="class_entitas_1_1_group.html#ae48b92ee4d75ca6ec41d1e1187e3b1a2">matcher</a>)</td></tr>
<tr class="separator:acaac9039a6a059d944ccacd976980883"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78fe027e276b048903cd9eae363eb2db"><td class="memItemLeft" align="right" valign="top"><a id="a78fe027e276b048903cd9eae363eb2db"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a78fe027e276b048903cd9eae363eb2db">HandleEntitySilently</a> (TEntity entity)</td></tr>
<tr class="memdesc:a78fe027e276b048903cd9eae363eb2db"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is used by the context to manage the group. <br /></td></tr>
<tr class="separator:a78fe027e276b048903cd9eae363eb2db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62e1246c95b7c4bcbd45c57e2e8acd0f"><td class="memItemLeft" align="right" valign="top"><a id="a62e1246c95b7c4bcbd45c57e2e8acd0f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a62e1246c95b7c4bcbd45c57e2e8acd0f">HandleEntity</a> (TEntity entity, int index, <a class="el" href="interface_entitas_1_1_i_component.html">IComponent</a> component)</td></tr>
<tr class="memdesc:a62e1246c95b7c4bcbd45c57e2e8acd0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is used by the context to manage the group. <br /></td></tr>
<tr class="separator:a62e1246c95b7c4bcbd45c57e2e8acd0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00aeb42175d3c423473202dd872ee767"><td class="memItemLeft" align="right" valign="top"><a id="a00aeb42175d3c423473202dd872ee767"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a00aeb42175d3c423473202dd872ee767">UpdateEntity</a> (TEntity entity, int index, <a class="el" href="interface_entitas_1_1_i_component.html">IComponent</a> previousComponent, <a class="el" href="interface_entitas_1_1_i_component.html">IComponent</a> newComponent)</td></tr>
<tr class="memdesc:a00aeb42175d3c423473202dd872ee767"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is used by the context to manage the group. <br /></td></tr>
<tr class="separator:a00aeb42175d3c423473202dd872ee767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f10b75019cf8d2b77ca4bc2a8556548"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a9f10b75019cf8d2b77ca4bc2a8556548">RemoveAllEventHandlers</a> ()</td></tr>
<tr class="separator:a9f10b75019cf8d2b77ca4bc2a8556548"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56ee47700da18c56c429ab0f1b2087d0"><td class="memItemLeft" align="right" valign="top"><a id="a56ee47700da18c56c429ab0f1b2087d0"></a>
GroupChanged&lt; TEntity &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>HandleEntity</b> (TEntity entity)</td></tr>
<tr class="separator:a56ee47700da18c56c429ab0f1b2087d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cf9ad55d983f23d7f9d95b22ab16553"><td class="memItemLeft" align="right" valign="top"><a id="a7cf9ad55d983f23d7f9d95b22ab16553"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a7cf9ad55d983f23d7f9d95b22ab16553">ContainsEntity</a> (TEntity entity)</td></tr>
<tr class="memdesc:a7cf9ad55d983f23d7f9d95b22ab16553"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines whether this group has the specified entity. <br /></td></tr>
<tr class="separator:a7cf9ad55d983f23d7f9d95b22ab16553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7238093207c3d6c19ffdc42a49ae35f4"><td class="memItemLeft" align="right" valign="top"><a id="a7238093207c3d6c19ffdc42a49ae35f4"></a>
TEntity []&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a7238093207c3d6c19ffdc42a49ae35f4">GetEntities</a> ()</td></tr>
<tr class="memdesc:a7238093207c3d6c19ffdc42a49ae35f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns all entities which are currently in this group. <br /></td></tr>
<tr class="separator:a7238093207c3d6c19ffdc42a49ae35f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac172a1a6ac1f671552c208d7bc07d99e"><td class="memItemLeft" align="right" valign="top"><a id="ac172a1a6ac1f671552c208d7bc07d99e"></a>
List&lt; TEntity &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#ac172a1a6ac1f671552c208d7bc07d99e">GetEntities</a> (List&lt; TEntity &gt; buffer)</td></tr>
<tr class="memdesc:ac172a1a6ac1f671552c208d7bc07d99e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the buffer with all entities which are currently in this group. <br /></td></tr>
<tr class="separator:ac172a1a6ac1f671552c208d7bc07d99e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabd89b39a6f29a02fba43cc597fb3ce7"><td class="memItemLeft" align="right" valign="top"><a id="aabd89b39a6f29a02fba43cc597fb3ce7"></a>
IEnumerable&lt; TEntity &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>AsEnumerable</b> ()</td></tr>
<tr class="separator:aabd89b39a6f29a02fba43cc597fb3ce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21879ceded3ae5b57fcfb8c08d7eb39b"><td class="memItemLeft" align="right" valign="top"><a id="a21879ceded3ae5b57fcfb8c08d7eb39b"></a>
HashSet&lt; TEntity &gt;.Enumerator&#160;</td><td class="memItemRight" valign="bottom"><b>GetEnumerator</b> ()</td></tr>
<tr class="separator:a21879ceded3ae5b57fcfb8c08d7eb39b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac08cf5ddaa5b330622e032a120cdc2b"><td class="memItemLeft" align="right" valign="top">TEntity&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#aac08cf5ddaa5b330622e032a120cdc2b">GetSingleEntity</a> ()</td></tr>
<tr class="separator:aac08cf5ddaa5b330622e032a120cdc2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3df87e47a39bdc6ab58f4ec505e5fd8e"><td class="memItemLeft" align="right" valign="top"><a id="a3df87e47a39bdc6ab58f4ec505e5fd8e"></a>
override string&#160;</td><td class="memItemRight" valign="bottom"><b>ToString</b> ()</td></tr>
<tr class="separator:a3df87e47a39bdc6ab58f4ec505e5fd8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a5956e8fd6ffc501f5fb552c110c1c635"><td class="memItemLeft" align="right" valign="top"><a id="a5956e8fd6ffc501f5fb552c110c1c635"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a5956e8fd6ffc501f5fb552c110c1c635">count</a><code> [get]</code></td></tr>
<tr class="memdesc:a5956e8fd6ffc501f5fb552c110c1c635"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of entities in the group. <br /></td></tr>
<tr class="separator:a5956e8fd6ffc501f5fb552c110c1c635"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae48b92ee4d75ca6ec41d1e1187e3b1a2"><td class="memItemLeft" align="right" valign="top"><a id="ae48b92ee4d75ca6ec41d1e1187e3b1a2"></a>
<a class="el" href="interface_entitas_1_1_i_matcher.html">IMatcher</a>&lt; TEntity &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#ae48b92ee4d75ca6ec41d1e1187e3b1a2">matcher</a><code> [get]</code></td></tr>
<tr class="memdesc:ae48b92ee4d75ca6ec41d1e1187e3b1a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the matcher which was used to create this group. <br /></td></tr>
<tr class="separator:ae48b92ee4d75ca6ec41d1e1187e3b1a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="events"></a>
Events</h2></td></tr>
<tr class="memitem:a5e8f0b4ad1ac380a5fb8ae5f3806140d"><td class="memItemLeft" align="right" valign="top"><a id="a5e8f0b4ad1ac380a5fb8ae5f3806140d"></a>
GroupChanged&lt; TEntity &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a5e8f0b4ad1ac380a5fb8ae5f3806140d">OnEntityAdded</a></td></tr>
<tr class="memdesc:a5e8f0b4ad1ac380a5fb8ae5f3806140d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Occurs when an entity gets added. <br /></td></tr>
<tr class="separator:a5e8f0b4ad1ac380a5fb8ae5f3806140d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad010b1c3944aa9aa54c5ff76c93c431e"><td class="memItemLeft" align="right" valign="top"><a id="ad010b1c3944aa9aa54c5ff76c93c431e"></a>
GroupChanged&lt; TEntity &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#ad010b1c3944aa9aa54c5ff76c93c431e">OnEntityRemoved</a></td></tr>
<tr class="memdesc:ad010b1c3944aa9aa54c5ff76c93c431e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Occurs when an entity gets removed. <br /></td></tr>
<tr class="separator:ad010b1c3944aa9aa54c5ff76c93c431e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a925d5a507d149042cfa728111c1a0d41"><td class="memItemLeft" align="right" valign="top"><a id="a925d5a507d149042cfa728111c1a0d41"></a>
GroupUpdated&lt; TEntity &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entitas_1_1_group.html#a925d5a507d149042cfa728111c1a0d41">OnEntityUpdated</a></td></tr>
<tr class="memdesc:a925d5a507d149042cfa728111c1a0d41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Occurs when a component of an entity in the group gets replaced. <br /></td></tr>
<tr class="separator:a925d5a507d149042cfa728111c1a0d41"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Use context.GetGroup(matcher) to get a group of entities which match the specified matcher. Calling context.GetGroup(matcher) with the same matcher will always return the same instance of the group. The created group is managed by the context and will always be up to date. It will automatically add entities that match the matcher or remove entities as soon as they don't match the matcher anymore. </p>
<div class="typeconstraint">
<dl><dt><b>Type Constraints</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em>TEntity</em></td><td>&#160;:</td><td valign="top"><em>class</em></td><td>&#160;</td></tr>
<tr><td valign="top"><em>TEntity</em></td><td>&#160;:</td><td valign="top"><em><a class="el" href="interface_entitas_1_1_i_entity.html">IEntity</a></em></td><td>&#160;</td></tr>
</table>
</dd>
</dl>
</div>

<p class="definition">Definition at line <a class="el" href="_group_8cs_source.html#l00011">11</a> of file <a class="el" href="_group_8cs_source.html">Group.cs</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="acaac9039a6a059d944ccacd976980883"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acaac9039a6a059d944ccacd976980883">&#9670;&nbsp;</a></span>Group()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_entitas_1_1_group.html">Entitas.Group</a>&lt; TEntity &gt;.<a class="el" href="class_entitas_1_1_group.html">Group</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interface_entitas_1_1_i_matcher.html">IMatcher</a>&lt; TEntity &gt;&#160;</td>
          <td class="paramname"><em>matcher</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Use context.GetGroup(matcher) to get a group of entities which match the specified matcher. </p>

<p class="definition">Definition at line <a class="el" href="_group_8cs_source.html#l00040">40</a> of file <a class="el" href="_group_8cs_source.html">Group.cs</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aac08cf5ddaa5b330622e032a120cdc2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac08cf5ddaa5b330622e032a120cdc2b">&#9670;&nbsp;</a></span>GetSingleEntity()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TEntity <a class="el" href="class_entitas_1_1_group.html">Entitas.Group</a>&lt; TEntity &gt;.GetSingleEntity </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the only entity in this group. It will return null if the group is empty. It will throw an exception if the group has more than one entity. </p>

<p class="definition">Definition at line <a class="el" href="_group_8cs_source.html#l00171">171</a> of file <a class="el" href="_group_8cs_source.html">Group.cs</a>.</p>

</div>
</div>
<a id="a9f10b75019cf8d2b77ca4bc2a8556548"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f10b75019cf8d2b77ca4bc2a8556548">&#9670;&nbsp;</a></span>RemoveAllEventHandlers()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_entitas_1_1_group.html">Entitas.Group</a>&lt; TEntity &gt;.RemoveAllEventHandlers </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Removes all event handlers from this group. Keep in mind that this will break reactive systems and entity indices which rely on this group. </p>

<p class="definition">Definition at line <a class="el" href="_group_8cs_source.html#l00082">82</a> of file <a class="el" href="_group_8cs_source.html">Group.cs</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Entitas/Entitas/Group/<a class="el" href="_group_8cs_source.html">Group.cs</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_entitas.html">Entitas</a></li><li class="navelem"><a class="el" href="class_entitas_1_1_group.html">Group</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
